import { createRouter, createWebHistory } from 'vue-router'
const routes = [{
        path: '/',
        // 这是官方推荐的方法使用ES的import,是路由懒加载
        component: () =>
            import ("../components/Login.vue"),
        hidden: true
    }, {
        path: '/login',
        component: () =>
            import ("../components/Login.vue"),
        hidden: true
    },
    {
        path: '/home',
        name: '学生管理',
        redirect: '/home/student',
        iconClass: "fa fa-users",
        component: () =>
            import ("../components/home.vue"),
        children: [{
                path: '/home/student',
                name: '学生列表',
                iconClass: "fa fa-list",
                component: () =>
                    import ("../components/students/StudentList.vue"),
            },
            {
                path: '/home/info',
                name: '信息列表',
                iconClass: "fa fa-list-alt",
                component: () =>
                    import ("../components/students/InfoList.vue"),
            }, {
                path: '/home/infoment',
                name: '信息管理',
                iconClass: "fa fa-list-alt",
                component: () =>
                    import ("../components/students/InfoMent.vue"),
            }, {
                path: '/home/work',
                name: '作业列表',
                iconClass: "fa fa-list-ul",
                component: () =>
                    import ("../components/students/WorkList.vue"),
            }, {
                path: '/home/workment',
                name: '作业管理',
                iconClass: "fa fa-th-list",
                component: () =>
                    import ("../components/students/WorkMent.vue"),
            }
        ]
    },
    {
        path: '/home',
        name: '数据分析 ',
        iconClass: "fa fa-bar-chart",
        component: () =>
            import ("../components/home.vue"),
        children: [{
            path: '/home/dataview',
            name: '数据概览',
            iconClass: "fa fa-line-chart",
            component: () =>
                import ("../components/dataAnalysis/DataView.vue"),
        }, {
            path: '/home/mapview',
            name: '地图概览',
            iconClass: "fa fa-list-alt",
            component: () =>
                import ("../components/dataAnalysis/MapView.vue"),
        }, {
            path: '/home/travel',
            name: '旅游地图',
            iconClass: "fa fa-list-alt",
            component: () =>
                import ("../components/dataAnalysis/TravelMap.vue"),
        }, {
            path: '/home/score',
            name: '分数地图',
            iconClass: "fa fa-list-ul",
            component: () =>
                import ("../components/dataAnalysis/ScoreMap.vue"),
        }, {
            path: '/home/PianoKeyboardWithMusic',
            name: "带音乐的钢琴键盘",
            component: () =>
                import ("../components/dataAnalysis/PianoKeyboardWithMusic.vue"),
        }, {
            path: '/home/WorldMap',
            name: "世界地图",
            component: () =>
                import ("../components/dataAnalysis/WorldMap.vue"),
        }]
    },
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router